import sys

from django.urls import path
from django.http.response import JsonResponse
from django.conf import settings
from django.core.management import execute_from_command_line

settings.configure(
    DEBUG=True,
    ROOT_URLCONF=__name__
)


def index(request):
    return JsonResponse('hello world', safe=False)


urlpatterns = (
    path('', index),
)

if __name__ == '__main__':
    execute_from_command_line(sys.argv)
